/**
 * 
 */
package com.ap.core.business.message.domain.translators.header.impl;

import com.ap.core.business.message.domain.translators.AbstractHeaderTranslator;
import com.ap.core.business.message.domain.translators.BindingListener;
import com.ap.core.business.message.domain.translators.BindingMetaData;
import com.ap.core.common.types.InputMessageType;
import com.ap.core.domain.ApMessage;
import com.ap.core.exception.BusinessFailureException;
import com.ap.core.message.manageconsumer.info.RequestRetrieveConsumerDetailsTypeInfo;

/**
 * The Class RetrieveConsumerDetailsMsgHdrTranslator.
 * 
 * @author Siva.Pochana
 */
public class RetrieveConsumerDetailsMsgHdrTranslator extends
		AbstractHeaderTranslator<RequestRetrieveConsumerDetailsTypeInfo> {

	/* (non-Javadoc)
	 * @see com.ap.core.business.message.domain.translators.Translator#translate(java.lang.Object, com.ap.core.business.message.domain.translators.BindingMetaData, com.ap.core.business.message.domain.translators.BindingListener)
	 */
	@Override
	public void translate(RequestRetrieveConsumerDetailsTypeInfo boundObject,
			BindingMetaData metaData, BindingListener bindingListener)
			throws BusinessFailureException {
		   final InputMessageType inputMessageType = metaData.getInputMessageType();
	        final ApMessage apRequestEvent = populateApEvent(inputMessageType, metaData.getReconciliationInfo().getReconciliationCycleId(), metaData.getReconciliationInfo().getReconciliationDate(), boundObject.getMsgHdr().getMsgId(), boundObject.getMsgHdr().getMsgTimestamp(), boundObject.getConsRegRequestInfo().getFIId()) ;
	        bindingListener.onApMessage(apRequestEvent, null);
	}

}
